/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_orm.htm
 *
 * Zhiqim ORM is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.orm.test.dboext;

import java.math.BigDecimal;
import java.io.Serializable;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 整型和小数视图 对应视图《T_INTEGER_DECIMAL》
 */
@AnAlias("TIntegerDecimal")
@AnNew
@AnView("T_INTEGER,T_DECIMAL")
@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="T_INTEGER", lColumn="T_ID", rTable="T_DECIMAL", rColumn="T_ID")})
public class TIntegerDecimal implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnViewField(table="T_INTEGER", column="T_ID")    private long tId;    //1.测试编号
    @AnViewField(table="T_INTEGER", column="T_BOOLEAN")    private boolean tBoolean;    //2.布尔型
    @AnViewField(table="T_DECIMAL", column="T_DM5_2")    private BigDecimal tDm52;    //3.测试5位长度，小数2位
    @AnViewField(table="T_DECIMAL", column="T_DM10_3")    private BigDecimal tDm103;    //4.测试10位长度，小数3位

    public String toString()
    {
        return Jsons.toString(this);
    }

    public long tId()
    {
        return tId;
    }

    public TIntegerDecimal tId(long tId)
    {
        this.tId = tId;
        return this;
    }

    public boolean tBoolean()
    {
        return tBoolean;
    }

    public TIntegerDecimal tBoolean(boolean tBoolean)
    {
        this.tBoolean = tBoolean;
        return this;
    }

    public BigDecimal tDm52()
    {
        return tDm52;
    }

    public TIntegerDecimal tDm52(BigDecimal tDm52)
    {
        this.tDm52 = tDm52;
        return this;
    }

    public BigDecimal tDm103()
    {
        return tDm103;
    }

    public TIntegerDecimal tDm103(BigDecimal tDm103)
    {
        this.tDm103 = tDm103;
        return this;
    }
}
